package com.huawei.appmarket.oobe.app;

import android.app.job.JobInfo.Builder;
import android.app.job.JobParameters;
import android.app.job.JobScheduler;
import android.app.job.JobService;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.os.Build.VERSION;
import androidx.annotation.RequiresApi;
import o.dli;
import o.Logger;
import o.ll;

@RequiresApi(api = 21)
public class OOBEShowNotificationJobService extends JobService {
    public static void schedule(Context context) {
        if (!dli.ॱ(context) && VERSION.SDK_INT >= 26) {
            ((JobScheduler) context.getSystemService("jobscheduler")).schedule(new Builder(1002, new ComponentName(context.getPackageName(), OOBEShowNotificationJobService.class.getName())).setPersisted(true).setRequiredNetworkType(1).build());
            Logger.ˎ("OOBE", "OOBEShowNotificationJobService scheduled");
        }
    }

    public boolean onStartJob(JobParameters jobParameters) {
        Logger.ˎ("OOBE", "OOBEShowNotificationJobService onStartJob");
        Intent intent = new Intent("com.huawei.appmarket.oobe.ACTION_SHOW_NOTIFICATION");
        intent.setClass(this, OOBEFlowController.class);
        ll.ˏ(this).ˋ(intent);
        return false;
    }

    public boolean onStopJob(JobParameters jobParameters) {
        return false;
    }
}
